<template>
	<view class="common-content">
		<!-- 详情-确认处方 -->
		<view class="common-content-box container">
			<!-- <view class="title">
				{{detail.name}}
			</view> 处方名-->
			<view class="inform-msg-row">
				{{detail.createTime || ''}}
			</view>
			<u-parse :html="detail.expertAdvice || '暂无详情'" :tag-style="style"></u-parse>
			<!-- <view class="inform-msg">
				<view class="inform-msg-row">
					附件
				</view>
				<view class="inform-msg-row2" v-for="(item,index) in 1" :key="index">
					<text class="text">
						<u-icon name="file-text-fill" color="#999" size="28"></u-icon>
					</text>
					<text class="text">{{item.fileName || '--'}}.</text>
					<text class="text red" :data-type="item.fileName " :data-url="item.url"
						:data-img-url="item.url" @tap="previewAll">预览</text>
					<text class="red" @click="downloadFile(item.url)">下载</text>
				</view>
			</view> -->
		<!-- 通栏按钮 -->
		</view>
		<!-- <view class="footer container" v-if="isShow">
			<u-button  @click="useHandle()" :custom-style="buttonStyle" shape="circle" hover-class="none">使用该处方</u-button>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: uni.getStorageSync('expertItemDetail'),
				isShow:false,
				style: {
					p: 'text-indent:2em;font-size:28rpx',
					span: 'font-size: 28rpx'
				},
				// button
				buttonStyle: {
					// position:"fixed",
					// bottom:"30rpx",
					width: "100%",
					height: "90rpx",
					fontSize: "32rpx",
					color:"#fff",
					borderRadius: "45rpx",
					backgroundColor: "#F4333C",
				},
			};
		},
		onLoad(options) {
			this.isShow = options.isShow;
			console.log('详情', this.detail);
		},
		methods: {
			// 使用处方
			useHandle() {
				// console.log('保存');
				uni.setStorageSync('e-prescribingDetail',this.detail)
				uni.navigateTo({
					url:"/pages/mine/myConsultation/inquiriesDetails"
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	$height:100rpx;
	.common-content-box{
		padding-bottom: 30rpx;
	}
.title{
	text-align: center;
}
	.inform-msg-row {
		height: $height;
	}

	.inform-msg {

		&-row,
		&-row2 {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: $height;
			// background: #fff;
			// border-bottom:1rpx #E3E3E3 solid;
			>.text:first-child {
				font-size: 30rpx;
				color: #999999;
				// font-weight: 700;
			}

			>.text:last-child {
				font-size: 30rpx;
				color: #333333;
			}
		}

		&-row2 {
			justify-content: flex-start;

			.text {
				max-width: 300rpx;
				margin-right: 30rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}

			.red {
				color: $active-color;
			}
		}
	}
	.footer{
		position: relative;
		width: 100%;
		padding-bottom: 30rpx;
	}
</style>
